package util

import (
	"os"
	"time"
)

func IsFileModified(filePath string, lastModified *time.Time) bool {
	fileInfo, err := os.Stat(filePath)
	if err != nil {
		return false
	}

	modTime := fileInfo.ModTime().UTC()
	if !modTime.Equal(*lastModified) {
		*lastModified = modTime
		return true
	}
	return false
}
